/** RunLog-light
 * Log your runs - A simple program for runners
 *  
 * @author M. Mueller
 * @version 15.01.10  
 */

package runlog;

/**
 *	Data I/O from Database.
 */
public interface IDatabase {
	/**
	 * Initializes the database.
	 */
	void initDatabase();
	/**
	 * Loads Athlete from database.
	 * @param name1 Name of athlete to load.
	 * @return The loaded Athlete object.
	 */
	CAthlete loadAthleteFromDB(String name1);
	/**
	 * Saves Athlete.
	 * @param athlete1 the athlete to save to database.
	 */
	boolean addAthleteToDB(CAthlete athlete1);
	/**
	 * Deletes Athlete.
	 * @param name1 name of the athlete to delete from database.
	 * @return 'true' if deleted, 'false' if not.
	 */
	boolean deleteAthleteFromDB(String name1);
	/**
	 * Updates athlete's trainings in database.
	 * @param athlete1 the athlete to save to the database.
	 * @return 'true' if updated successfully, 'false' if not.
	 */
	boolean updateTrainingOfAthlete(CAthlete athlete1);
	/**
	 *	Prints all data.
	 *	@param athlete1 The athlete to print data from.
	 */
	void printAllTrainingData(CAthlete athlete1);
	/**
	 *	Prints specific date.
	 *	@param athlete1 The athlete to print data from.
	 *	@param date1 The date of the training session
	 */
	void printOneDateTrainingData(final CAthlete athlete1, final String date1);

}
